5
5
.
.
2
2
4
4
.
.
u
u
n
n
d
d
e
e
r
r
l
l
i
i
n
n
e
e
I
I
n
n
f
f
o
o
.underline modifier underlines text with different colors.
Syntax
.underline()
.underline(true, color: Color.red)
E
E
x
x
a
a
m
m
p
p
l
l
e
e
Example
struct ContentView: View {
var body: some View {
VStack {
Text("Normal").font(.largeTitle)
Text("Underline").font(.largeTitle)
.underline(true, color: Color.red)
}
}
}
Output